package dq.study.designmodel.strategy;

import dq.study.designmodel.strategy.sort.SortUtils;

/**
 * @author dongqun
 * @Description:
 * @date 2019/4/10 21:42
 */
public class Client {

    public static void main(String[] args) {
        Compartor comartor = new WeightComartor();
        // 运行时传入不同的比较策略
        Cat[] source = {new Cat(10L, 100L, comartor), new Cat(8L, 120L, comartor), new Cat(15L, 160L, comartor)};
        SortUtils.sort(source);
        SortUtils.print(source);
    }

}
